Update README.md - #2
Closed
jamesefhawkins wants to merge 1 commit into
Closed
Conversation
k11kirky
added a commit
that referenced
this pull request
Mar 13, 2025
k11kirky
added a commit
that referenced
this pull request
Mar 14, 2025
* feat: add suppoort for responses api * fix: test * fix: black * fix: test - hopefully * fix: test - hopefully #2 * fix: test - hopefully #3 * fix: test - hopefully #4 * fix: greptaile catch * fix: mypy is not my friend * fix: isort usort weallsort * fix: noredef * fix: mypy baseline * fix: mypy * fix: mypy
posthog Bot
added a commit
that referenced
this pull request
Jul 29, 2026
The sdk-specs `flush` contract requires an explicit flush to bypass the batching thresholds: "Do not wait for `flushAt` or `flushInterval`; attempt delivery now" (openspec/specs/flush/spec.md, Requirement "Canonical flush behavior", Behavior #2). `Consumer.next()` accumulates until it has `flush_at` items or `flush_interval` elapses, and nothing connected `flush()` to a consumer parked mid-batch — `_Lane.flush()` only blocked on `queue.join()`. So a consumer holding a partial batch kept waiting for more events and the caller waited with it: on defaults, `capture()` + `flush()` took ~5s. Worse, `flush()` defaults to `timeout_seconds=10`, so any `flush_interval` above that made the default `flush()` give up and deliver nothing. Add `DrainSignal`, a generation counter shared by a lane and its consumers. `flush()` and `join()` bump it; while a request is outstanding a consumer takes only what is already queued and uploads as soon as the queue comes up empty, which is when it marks the request served. A consumer already holding a partial batch waits in slices so it notices a request that lands while it is parked; an idle consumer still parks for the whole interval, since a new put wakes its get() anyway. Timer-based batching without an explicit flush is unchanged: a slice expiring only re-arms the wait, and the batch window still closes on `flush_at`, the batch size limit, or a full `flush_interval`. Generated-By: PostHog Code Task-Id: 2bc2b5c5-03be-4da2-b7df-97c3364b33c9
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simplifying the docs (I have updated github.com/posthog/posthog/wiki with what was here)